import { createBrowserRouter, RouteObject } from "react-router-dom";
import AdminLayout from "@/components/layout";
import ErrorPage from "@/error-page";
import Contact from "./contact";
import Test1 from "@/pages/test";
// import UserList from "../pages/UserList";
// import VideoManage from "../pages/VideoManage";
// import FileManage from "../pages/FileManage";
// 扩展路由配置类型
export interface RouteMeta {
  title: string; // 面包屑显示名称
  icon?: React.ReactNode; // 菜单图标（可选）
}
export type AppRoute = RouteObject & {
  meta?: RouteMeta;
  children?: AppRoute[];
};
export const routes = createBrowserRouter([
  {
    path: "/",
    element: <AdminLayout />,
    errorElement: <ErrorPage />,
    children: [
      {
        path: "contacts/:contactId",
        element: <Contact />,
      },
      {
        path: "test1",
        element: <Test1 />,
      },
    ],
  },
]);
